home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Utilities / Partition Logic 0.68 / partlogic-0.68.iso / system / headers / stdio.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-10  |  2.7 KB  |  86 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2007 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  stdio.h
  20.  
  21. // This is the Visopsys version of the standard header file stdio.h
  22.  
  23. #if !defined(_STDIO_H)
  24.  
  25. #include <stdarg.h>
  26. #include <sys/stream.h>
  27.  
  28. // Make FILE be the same as a Visopsys 'fileStream'
  29. #define FILE fileStream
  30.  
  31. #ifndef EOF
  32. #define EOF -1
  33. #endif
  34.  
  35. #define stdout (FILE *) 1
  36. #define stdin  (FILE *) 2
  37. #define stderr (FILE *) 3
  38.  
  39. // For seeking using fseek()
  40. #define SEEK_SET 0x01
  41. #define SEEK_CUR 0x02
  42. #define SEEK_END 0x03
  43.  
  44. // fpos_t
  45. typedef unsigned fpos_t;
  46.  
  47. // Available functions
  48. int fclose(FILE *);
  49. int fflush(FILE *);
  50. int fgetpos(FILE *, fpos_t *);
  51. char *fgets(char *, int, FILE *);
  52. FILE *fopen(const char *, const char *);
  53. int fprintf(FILE *, const char *, ...) __attribute__((format(printf, 2, 3)));
  54. size_t fread(void *, size_t, size_t, FILE *);
  55. int fscanf(FILE *, const char *, ...) __attribute__((format(scanf, 2, 3)));
  56. int fseek(FILE *, long, int);
  57. int fsetpos(FILE *, fpos_t *);
  58. long ftell(FILE *);
  59. size_t fwrite(const void *, size_t, size_t, FILE *);
  60. int getc(FILE *);
  61. int getchar(void);
  62. char *gets(char *);
  63. void perror(const char *);
  64. int printf(const char *, ...) __attribute__((format(printf, 1, 2)));
  65. int putc(int, FILE *);
  66. int putchar(int);
  67. int puts(const char *);
  68. int remove(const char *);
  69. int rename(const char *, const char *);
  70. void rewind(FILE *);
  71. int scanf(const char *, ...) __attribute__((format(scanf, 1, 2)));
  72. int snprintf(char *, size_t, const char *, ...)
  73.      __attribute__((format(printf, 3, 4)));
  74. int sprintf(char *, const char *, ...) __attribute__((format(printf, 2, 3)));
  75. int sscanf(const char *, const char *, ...);
  76. int vfprintf(FILE *, const char *, va_list);
  77. int vfscanf(FILE *, const char *, va_list);
  78. int vprintf(const char *, va_list);
  79. int vscanf(const char *, va_list);
  80. int vsnprintf(char *, size_t, const char *, va_list);
  81. int vsprintf(char *, const char *, va_list);
  82. int vsscanf(const char *, const char *, va_list);
  83.  
  84. #define _STDIO_H
  85. #endif
  86.